Integrand size = 21, antiderivative size = 141 \[ \int \cot ^5(c+d x) (a+b \tan (c+d x))^4 \, dx=4 a b \left (a^2-b^2\right ) x+\frac {4 a b \left (a^2-b^2\right ) \cot (c+d x)}{d}+\frac {a^2 \left (2 a^2-11 b^2\right ) \cot ^2(c+d x)}{4 d}-\frac {5 a^3 b \cot ^3(c+d x)}{6 d}+\frac {\left (a^4-6 a^2 b^2+b^4\right ) \log (\sin (c+d x))}{d}-\frac {a^2 \cot ^4(c+d x) (a+b \tan (c+d x))^2}{4 d} \]
4*a*b*(a^2-b^2)*x+4*a*b*(a^2-b^2)*cot(d*x+c)/d+1/4*a^2*(2*a^2-11*b^2)*cot( d*x+c)^2/d-5/6*a^3*b*cot(d*x+c)^3/d+(a^4-6*a^2*b^2+b^4)*ln(sin(d*x+c))/d-1 /4*a^2*cot(d*x+c)^4*(a+b*tan(d*x+c))^2/d
Result contains complex when optimal does not.
Time = 2.27 (sec) , antiderivative size = 147, normalized size of antiderivative = 1.04 \[ \int \cot ^5(c+d x) (a+b \tan (c+d x))^4 \, dx=\frac {48 a b \left (a^2-b^2\right ) \cot (c+d x)+6 a^2 \left (a^2-6 b^2\right ) \cot ^2(c+d x)-16 a^3 b \cot ^3(c+d x)-3 a^4 \cot ^4(c+d x)-6 \left ((a+i b)^4 \log (i-\tan (c+d x))-2 \left (a^4-6 a^2 b^2+b^4\right ) \log (\tan (c+d x))+(a-i b)^4 \log (i+\tan (c+d x))\right )}{12 d} \]
(48*a*b*(a^2 - b^2)*Cot[c + d*x] + 6*a^2*(a^2 - 6*b^2)*Cot[c + d*x]^2 - 16 *a^3*b*Cot[c + d*x]^3 - 3*a^4*Cot[c + d*x]^4 - 6*((a + I*b)^4*Log[I - Tan[ c + d*x]] - 2*(a^4 - 6*a^2*b^2 + b^4)*Log[Tan[c + d*x]] + (a - I*b)^4*Log[ I + Tan[c + d*x]]))/(12*d)
Time = 1.10 (sec) , antiderivative size = 152, normalized size of antiderivative = 1.08, number of steps used = 17, number of rules used = 17, \(\frac {\text {number of rules}}{\text {integrand size}}\) = 0.810, Rules used = {3042, 4048, 27, 3042, 4118, 25, 3042, 4111, 27, 3042, 4012, 25, 3042, 4014, 3042, 25, 3956}
Below are the steps used by Rubi to obtain the solution. The rule number used for the transformation is given above next to the arrow. The rules definitions used are listed below.
\(\displaystyle \int \cot ^5(c+d x) (a+b \tan (c+d x))^4 \, dx\) |
\(\Big \downarrow \) 3042 |
\(\displaystyle \int \frac {(a+b \tan (c+d x))^4}{\tan (c+d x)^5}dx\) |
\(\Big \downarrow \) 4048 |
\(\displaystyle \frac {1}{4} \int 2 \cot ^4(c+d x) (a+b \tan (c+d x)) \left (5 b a^2-2 \left (a^2-3 b^2\right ) \tan (c+d x) a-b \left (a^2-2 b^2\right ) \tan ^2(c+d x)\right )dx-\frac {a^2 \cot ^4(c+d x) (a+b \tan (c+d x))^2}{4 d}\) |
\(\Big \downarrow \) 27 |
\(\displaystyle \frac {1}{2} \int \cot ^4(c+d x) (a+b \tan (c+d x)) \left (5 b a^2-2 \left (a^2-3 b^2\right ) \tan (c+d x) a-b \left (a^2-2 b^2\right ) \tan ^2(c+d x)\right )dx-\frac {a^2 \cot ^4(c+d x) (a+b \tan (c+d x))^2}{4 d}\) |
\(\Big \downarrow \) 3042 |
\(\displaystyle \frac {1}{2} \int \frac {(a+b \tan (c+d x)) \left (5 b a^2-2 \left (a^2-3 b^2\right ) \tan (c+d x) a-b \left (a^2-2 b^2\right ) \tan (c+d x)^2\right )}{\tan (c+d x)^4}dx-\frac {a^2 \cot ^4(c+d x) (a+b \tan (c+d x))^2}{4 d}\) |
\(\Big \downarrow \) 4118 |
\(\displaystyle \frac {1}{2} \left (\int -\cot ^3(c+d x) \left (\left (2 a^2-11 b^2\right ) a^2+8 b \left (a^2-b^2\right ) \tan (c+d x) a+b^2 \left (a^2-2 b^2\right ) \tan ^2(c+d x)\right )dx-\frac {5 a^3 b \cot ^3(c+d x)}{3 d}\right )-\frac {a^2 \cot ^4(c+d x) (a+b \tan (c+d x))^2}{4 d}\) |
\(\Big \downarrow \) 25 |
\(\displaystyle \frac {1}{2} \left (-\int \cot ^3(c+d x) \left (\left (2 a^2-11 b^2\right ) a^2+8 b \left (a^2-b^2\right ) \tan (c+d x) a+b^2 \left (a^2-2 b^2\right ) \tan ^2(c+d x)\right )dx-\frac {5 a^3 b \cot ^3(c+d x)}{3 d}\right )-\frac {a^2 \cot ^4(c+d x) (a+b \tan (c+d x))^2}{4 d}\) |
\(\Big \downarrow \) 3042 |
\(\displaystyle \frac {1}{2} \left (-\int \frac {\left (2 a^2-11 b^2\right ) a^2+8 b \left (a^2-b^2\right ) \tan (c+d x) a+b^2 \left (a^2-2 b^2\right ) \tan (c+d x)^2}{\tan (c+d x)^3}dx-\frac {5 a^3 b \cot ^3(c+d x)}{3 d}\right )-\frac {a^2 \cot ^4(c+d x) (a+b \tan (c+d x))^2}{4 d}\) |
\(\Big \downarrow \) 4111 |
\(\displaystyle \frac {1}{2} \left (-\int 2 \cot ^2(c+d x) \left (4 a b \left (a^2-b^2\right )-\left (a^4-6 b^2 a^2+b^4\right ) \tan (c+d x)\right )dx-\frac {5 a^3 b \cot ^3(c+d x)}{3 d}+\frac {a^2 \left (2 a^2-11 b^2\right ) \cot ^2(c+d x)}{2 d}\right )-\frac {a^2 \cot ^4(c+d x) (a+b \tan (c+d x))^2}{4 d}\) |
\(\Big \downarrow \) 27 |
\(\displaystyle \frac {1}{2} \left (-2 \int \cot ^2(c+d x) \left (4 a b \left (a^2-b^2\right )-\left (a^4-6 b^2 a^2+b^4\right ) \tan (c+d x)\right )dx-\frac {5 a^3 b \cot ^3(c+d x)}{3 d}+\frac {a^2 \left (2 a^2-11 b^2\right ) \cot ^2(c+d x)}{2 d}\right )-\frac {a^2 \cot ^4(c+d x) (a+b \tan (c+d x))^2}{4 d}\) |
\(\Big \downarrow \) 3042 |
\(\displaystyle \frac {1}{2} \left (-2 \int \frac {4 a b \left (a^2-b^2\right )-\left (a^4-6 b^2 a^2+b^4\right ) \tan (c+d x)}{\tan (c+d x)^2}dx-\frac {5 a^3 b \cot ^3(c+d x)}{3 d}+\frac {a^2 \left (2 a^2-11 b^2\right ) \cot ^2(c+d x)}{2 d}\right )-\frac {a^2 \cot ^4(c+d x) (a+b \tan (c+d x))^2}{4 d}\) |
\(\Big \downarrow \) 4012 |
\(\displaystyle \frac {1}{2} \left (-2 \left (\int -\cot (c+d x) \left (a^4-6 b^2 a^2+4 b \left (a^2-b^2\right ) \tan (c+d x) a+b^4\right )dx-\frac {4 a b \left (a^2-b^2\right ) \cot (c+d x)}{d}\right )-\frac {5 a^3 b \cot ^3(c+d x)}{3 d}+\frac {a^2 \left (2 a^2-11 b^2\right ) \cot ^2(c+d x)}{2 d}\right )-\frac {a^2 \cot ^4(c+d x) (a+b \tan (c+d x))^2}{4 d}\) |
\(\Big \downarrow \) 25 |
\(\displaystyle \frac {1}{2} \left (-2 \left (-\int \cot (c+d x) \left (a^4-6 b^2 a^2+4 b \left (a^2-b^2\right ) \tan (c+d x) a+b^4\right )dx-\frac {4 a b \left (a^2-b^2\right ) \cot (c+d x)}{d}\right )-\frac {5 a^3 b \cot ^3(c+d x)}{3 d}+\frac {a^2 \left (2 a^2-11 b^2\right ) \cot ^2(c+d x)}{2 d}\right )-\frac {a^2 \cot ^4(c+d x) (a+b \tan (c+d x))^2}{4 d}\) |
\(\Big \downarrow \) 3042 |
\(\displaystyle \frac {1}{2} \left (-2 \left (-\int \frac {a^4-6 b^2 a^2+4 b \left (a^2-b^2\right ) \tan (c+d x) a+b^4}{\tan (c+d x)}dx-\frac {4 a b \left (a^2-b^2\right ) \cot (c+d x)}{d}\right )-\frac {5 a^3 b \cot ^3(c+d x)}{3 d}+\frac {a^2 \left (2 a^2-11 b^2\right ) \cot ^2(c+d x)}{2 d}\right )-\frac {a^2 \cot ^4(c+d x) (a+b \tan (c+d x))^2}{4 d}\) |
\(\Big \downarrow \) 4014 |
\(\displaystyle \frac {1}{2} \left (-2 \left (-\left (a^4-6 a^2 b^2+b^4\right ) \int \cot (c+d x)dx-\frac {4 a b \left (a^2-b^2\right ) \cot (c+d x)}{d}-4 a b x \left (a^2-b^2\right )\right )-\frac {5 a^3 b \cot ^3(c+d x)}{3 d}+\frac {a^2 \left (2 a^2-11 b^2\right ) \cot ^2(c+d x)}{2 d}\right )-\frac {a^2 \cot ^4(c+d x) (a+b \tan (c+d x))^2}{4 d}\) |
\(\Big \downarrow \) 3042 |
\(\displaystyle \frac {1}{2} \left (-2 \left (-\left (a^4-6 a^2 b^2+b^4\right ) \int -\tan \left (c+d x+\frac {\pi }{2}\right )dx-\frac {4 a b \left (a^2-b^2\right ) \cot (c+d x)}{d}-4 a b x \left (a^2-b^2\right )\right )-\frac {5 a^3 b \cot ^3(c+d x)}{3 d}+\frac {a^2 \left (2 a^2-11 b^2\right ) \cot ^2(c+d x)}{2 d}\right )-\frac {a^2 \cot ^4(c+d x) (a+b \tan (c+d x))^2}{4 d}\) |
\(\Big \downarrow \) 25 |
\(\displaystyle \frac {1}{2} \left (-2 \left (\left (a^4-6 a^2 b^2+b^4\right ) \int \tan \left (\frac {1}{2} (2 c+\pi )+d x\right )dx-\frac {4 a b \left (a^2-b^2\right ) \cot (c+d x)}{d}-4 a b x \left (a^2-b^2\right )\right )-\frac {5 a^3 b \cot ^3(c+d x)}{3 d}+\frac {a^2 \left (2 a^2-11 b^2\right ) \cot ^2(c+d x)}{2 d}\right )-\frac {a^2 \cot ^4(c+d x) (a+b \tan (c+d x))^2}{4 d}\) |
\(\Big \downarrow \) 3956 |
\(\displaystyle \frac {1}{2} \left (-\frac {5 a^3 b \cot ^3(c+d x)}{3 d}+\frac {a^2 \left (2 a^2-11 b^2\right ) \cot ^2(c+d x)}{2 d}-2 \left (-\frac {4 a b \left (a^2-b^2\right ) \cot (c+d x)}{d}-4 a b x \left (a^2-b^2\right )-\frac {\left (a^4-6 a^2 b^2+b^4\right ) \log (-\sin (c+d x))}{d}\right )\right )-\frac {a^2 \cot ^4(c+d x) (a+b \tan (c+d x))^2}{4 d}\) |
((a^2*(2*a^2 - 11*b^2)*Cot[c + d*x]^2)/(2*d) - (5*a^3*b*Cot[c + d*x]^3)/(3 *d) - 2*(-4*a*b*(a^2 - b^2)*x - (4*a*b*(a^2 - b^2)*Cot[c + d*x])/d - ((a^4 - 6*a^2*b^2 + b^4)*Log[-Sin[c + d*x]])/d))/2 - (a^2*Cot[c + d*x]^4*(a + b *Tan[c + d*x])^2)/(4*d)
3.5.53.3.1 Defintions of rubi rules used
Int[(a_)*(Fx_), x_Symbol] :> Simp[a Int[Fx, x], x] /; FreeQ[a, x] && !Ma tchQ[Fx, (b_)*(Gx_) /; FreeQ[b, x]]
Int[tan[(c_.) + (d_.)*(x_)], x_Symbol] :> Simp[-Log[RemoveContent[Cos[c + d *x], x]]/d, x] /; FreeQ[{c, d}, x]
Int[((a_.) + (b_.)*tan[(e_.) + (f_.)*(x_)])^(m_)*((c_.) + (d_.)*tan[(e_.) + (f_.)*(x_)]), x_Symbol] :> Simp[(b*c - a*d)*((a + b*Tan[e + f*x])^(m + 1)/ (f*(m + 1)*(a^2 + b^2))), x] + Simp[1/(a^2 + b^2) Int[(a + b*Tan[e + f*x] )^(m + 1)*Simp[a*c + b*d - (b*c - a*d)*Tan[e + f*x], x], x], x] /; FreeQ[{a , b, c, d, e, f}, x] && NeQ[b*c - a*d, 0] && NeQ[a^2 + b^2, 0] && LtQ[m, -1 ]
Int[((c_.) + (d_.)*tan[(e_.) + (f_.)*(x_)])/((a_.) + (b_.)*tan[(e_.) + (f_. )*(x_)]), x_Symbol] :> Simp[(a*c + b*d)*(x/(a^2 + b^2)), x] + Simp[(b*c - a *d)/(a^2 + b^2) Int[(b - a*Tan[e + f*x])/(a + b*Tan[e + f*x]), x], x] /; FreeQ[{a, b, c, d, e, f}, x] && NeQ[b*c - a*d, 0] && NeQ[a^2 + b^2, 0] && N eQ[a*c + b*d, 0]
Int[((a_.) + (b_.)*tan[(e_.) + (f_.)*(x_)])^(m_)*((c_.) + (d_.)*tan[(e_.) + (f_.)*(x_)])^(n_), x_Symbol] :> Simp[(b*c - a*d)^2*(a + b*Tan[e + f*x])^(m - 2)*((c + d*Tan[e + f*x])^(n + 1)/(d*f*(n + 1)*(c^2 + d^2))), x] - Simp[1 /(d*(n + 1)*(c^2 + d^2)) Int[(a + b*Tan[e + f*x])^(m - 3)*(c + d*Tan[e + f*x])^(n + 1)*Simp[a^2*d*(b*d*(m - 2) - a*c*(n + 1)) + b*(b*c - 2*a*d)*(b*c *(m - 2) + a*d*(n + 1)) - d*(n + 1)*(3*a^2*b*c - b^3*c - a^3*d + 3*a*b^2*d) *Tan[e + f*x] - b*(a*d*(2*b*c - a*d)*(m + n - 1) - b^2*(c^2*(m - 2) - d^2*( n + 1)))*Tan[e + f*x]^2, x], x], x] /; FreeQ[{a, b, c, d, e, f}, x] && NeQ[ b*c - a*d, 0] && NeQ[a^2 + b^2, 0] && NeQ[c^2 + d^2, 0] && GtQ[m, 2] && LtQ [n, -1] && IntegerQ[2*m]
Int[((a_.) + (b_.)*tan[(e_.) + (f_.)*(x_)])^(m_)*((A_.) + (B_.)*tan[(e_.) + (f_.)*(x_)] + (C_.)*tan[(e_.) + (f_.)*(x_)]^2), x_Symbol] :> Simp[(A*b^2 - a*b*B + a^2*C)*((a + b*Tan[e + f*x])^(m + 1)/(b*f*(m + 1)*(a^2 + b^2))), x ] + Simp[1/(a^2 + b^2) Int[(a + b*Tan[e + f*x])^(m + 1)*Simp[b*B + a*(A - C) - (A*b - a*B - b*C)*Tan[e + f*x], x], x], x] /; FreeQ[{a, b, e, f, A, B , C}, x] && NeQ[A*b^2 - a*b*B + a^2*C, 0] && LtQ[m, -1] && NeQ[a^2 + b^2, 0 ]
Int[((a_.) + (b_.)*tan[(e_.) + (f_.)*(x_)])*((c_.) + (d_.)*tan[(e_.) + (f_. )*(x_)])^(n_)*((A_.) + (B_.)*tan[(e_.) + (f_.)*(x_)] + (C_.)*tan[(e_.) + (f _.)*(x_)]^2), x_Symbol] :> Simp[(-(b*c - a*d))*(c^2*C - B*c*d + A*d^2)*((c + d*Tan[e + f*x])^(n + 1)/(d^2*f*(n + 1)*(c^2 + d^2))), x] + Simp[1/(d*(c^2 + d^2)) Int[(c + d*Tan[e + f*x])^(n + 1)*Simp[a*d*(A*c - c*C + B*d) + b* (c^2*C - B*c*d + A*d^2) + d*(A*b*c + a*B*c - b*c*C - a*A*d + b*B*d + a*C*d) *Tan[e + f*x] + b*C*(c^2 + d^2)*Tan[e + f*x]^2, x], x], x] /; FreeQ[{a, b, c, d, e, f, A, B, C}, x] && NeQ[b*c - a*d, 0] && NeQ[c^2 + d^2, 0] && LtQ[n , -1]
Time = 0.69 (sec) , antiderivative size = 144, normalized size of antiderivative = 1.02
method | result | size |
parallelrisch | \(\frac {2 \left (-a^{4}+6 a^{2} b^{2}-b^{4}\right ) \ln \left (\sec ^{2}\left (d x +c \right )\right )+4 \left (a^{4}-6 a^{2} b^{2}+b^{4}\right ) \ln \left (\tan \left (d x +c \right )\right )-a \left (\left (\cot ^{4}\left (d x +c \right )\right ) a^{3}+\frac {16 \left (\cot ^{3}\left (d x +c \right )\right ) a^{2} b}{3}+2 \left (-a^{3}+6 a \,b^{2}\right ) \left (\cot ^{2}\left (d x +c \right )\right )+16 \left (-a^{2} b +b^{3}\right ) \cot \left (d x +c \right )-16 b d x \left (a -b \right ) \left (a +b \right )\right )}{4 d}\) | \(144\) |
derivativedivides | \(\frac {-\frac {a^{4}}{4 \tan \left (d x +c \right )^{4}}+\left (a^{4}-6 a^{2} b^{2}+b^{4}\right ) \ln \left (\tan \left (d x +c \right )\right )+\frac {a^{2} \left (a^{2}-6 b^{2}\right )}{2 \tan \left (d x +c \right )^{2}}-\frac {4 a^{3} b}{3 \tan \left (d x +c \right )^{3}}+\frac {4 a b \left (a^{2}-b^{2}\right )}{\tan \left (d x +c \right )}+\frac {\left (-a^{4}+6 a^{2} b^{2}-b^{4}\right ) \ln \left (1+\tan ^{2}\left (d x +c \right )\right )}{2}+\left (4 a^{3} b -4 a \,b^{3}\right ) \arctan \left (\tan \left (d x +c \right )\right )}{d}\) | \(152\) |
default | \(\frac {-\frac {a^{4}}{4 \tan \left (d x +c \right )^{4}}+\left (a^{4}-6 a^{2} b^{2}+b^{4}\right ) \ln \left (\tan \left (d x +c \right )\right )+\frac {a^{2} \left (a^{2}-6 b^{2}\right )}{2 \tan \left (d x +c \right )^{2}}-\frac {4 a^{3} b}{3 \tan \left (d x +c \right )^{3}}+\frac {4 a b \left (a^{2}-b^{2}\right )}{\tan \left (d x +c \right )}+\frac {\left (-a^{4}+6 a^{2} b^{2}-b^{4}\right ) \ln \left (1+\tan ^{2}\left (d x +c \right )\right )}{2}+\left (4 a^{3} b -4 a \,b^{3}\right ) \arctan \left (\tan \left (d x +c \right )\right )}{d}\) | \(152\) |
norman | \(\frac {-\frac {a^{4}}{4 d}+\frac {a^{2} \left (a^{2}-6 b^{2}\right ) \left (\tan ^{2}\left (d x +c \right )\right )}{2 d}-\frac {4 a^{3} b \tan \left (d x +c \right )}{3 d}+\frac {4 a b \left (a^{2}-b^{2}\right ) \left (\tan ^{3}\left (d x +c \right )\right )}{d}+4 a b \left (a^{2}-b^{2}\right ) x \left (\tan ^{4}\left (d x +c \right )\right )}{\tan \left (d x +c \right )^{4}}+\frac {\left (a^{4}-6 a^{2} b^{2}+b^{4}\right ) \ln \left (\tan \left (d x +c \right )\right )}{d}-\frac {\left (a^{4}-6 a^{2} b^{2}+b^{4}\right ) \ln \left (1+\tan ^{2}\left (d x +c \right )\right )}{2 d}\) | \(163\) |
risch | \(4 a^{3} b x -4 a \,b^{3} x -i a^{4} x +6 i a^{2} b^{2} x -i b^{4} x -\frac {2 i a^{4} c}{d}+\frac {12 i a^{2} b^{2} c}{d}-\frac {2 i b^{4} c}{d}-\frac {4 i a \left (-3 i a^{3} {\mathrm e}^{6 i \left (d x +c \right )}+9 i a \,b^{2} {\mathrm e}^{6 i \left (d x +c \right )}-12 a^{2} b \,{\mathrm e}^{6 i \left (d x +c \right )}+6 b^{3} {\mathrm e}^{6 i \left (d x +c \right )}+3 i a^{3} {\mathrm e}^{4 i \left (d x +c \right )}-18 i a \,b^{2} {\mathrm e}^{4 i \left (d x +c \right )}+24 a^{2} b \,{\mathrm e}^{4 i \left (d x +c \right )}-18 b^{3} {\mathrm e}^{4 i \left (d x +c \right )}-3 i a^{3} {\mathrm e}^{2 i \left (d x +c \right )}+9 i a \,b^{2} {\mathrm e}^{2 i \left (d x +c \right )}-20 a^{2} b \,{\mathrm e}^{2 i \left (d x +c \right )}+18 b^{3} {\mathrm e}^{2 i \left (d x +c \right )}+8 a^{2} b -6 b^{3}\right )}{3 d \left ({\mathrm e}^{2 i \left (d x +c \right )}-1\right )^{4}}+\frac {a^{4} \ln \left ({\mathrm e}^{2 i \left (d x +c \right )}-1\right )}{d}-\frac {6 a^{2} \ln \left ({\mathrm e}^{2 i \left (d x +c \right )}-1\right ) b^{2}}{d}+\frac {\ln \left ({\mathrm e}^{2 i \left (d x +c \right )}-1\right ) b^{4}}{d}\) | \(346\) |
1/4*(2*(-a^4+6*a^2*b^2-b^4)*ln(sec(d*x+c)^2)+4*(a^4-6*a^2*b^2+b^4)*ln(tan( d*x+c))-a*(cot(d*x+c)^4*a^3+16/3*cot(d*x+c)^3*a^2*b+2*(-a^3+6*a*b^2)*cot(d *x+c)^2+16*(-a^2*b+b^3)*cot(d*x+c)-16*b*d*x*(a-b)*(a+b)))/d
Time = 0.24 (sec) , antiderivative size = 162, normalized size of antiderivative = 1.15 \[ \int \cot ^5(c+d x) (a+b \tan (c+d x))^4 \, dx=\frac {6 \, {\left (a^{4} - 6 \, a^{2} b^{2} + b^{4}\right )} \log \left (\frac {\tan \left (d x + c\right )^{2}}{\tan \left (d x + c\right )^{2} + 1}\right ) \tan \left (d x + c\right )^{4} - 16 \, a^{3} b \tan \left (d x + c\right ) + 3 \, {\left (3 \, a^{4} - 12 \, a^{2} b^{2} + 16 \, {\left (a^{3} b - a b^{3}\right )} d x\right )} \tan \left (d x + c\right )^{4} - 3 \, a^{4} + 48 \, {\left (a^{3} b - a b^{3}\right )} \tan \left (d x + c\right )^{3} + 6 \, {\left (a^{4} - 6 \, a^{2} b^{2}\right )} \tan \left (d x + c\right )^{2}}{12 \, d \tan \left (d x + c\right )^{4}} \]
1/12*(6*(a^4 - 6*a^2*b^2 + b^4)*log(tan(d*x + c)^2/(tan(d*x + c)^2 + 1))*t an(d*x + c)^4 - 16*a^3*b*tan(d*x + c) + 3*(3*a^4 - 12*a^2*b^2 + 16*(a^3*b - a*b^3)*d*x)*tan(d*x + c)^4 - 3*a^4 + 48*(a^3*b - a*b^3)*tan(d*x + c)^3 + 6*(a^4 - 6*a^2*b^2)*tan(d*x + c)^2)/(d*tan(d*x + c)^4)
Time = 2.27 (sec) , antiderivative size = 250, normalized size of antiderivative = 1.77 \[ \int \cot ^5(c+d x) (a+b \tan (c+d x))^4 \, dx=\begin {cases} \tilde {\infty } a^{4} x & \text {for}\: c = 0 \wedge d = 0 \\x \left (a + b \tan {\left (c \right )}\right )^{4} \cot ^{5}{\left (c \right )} & \text {for}\: d = 0 \\\tilde {\infty } a^{4} x & \text {for}\: c = - d x \\- \frac {a^{4} \log {\left (\tan ^{2}{\left (c + d x \right )} + 1 \right )}}{2 d} + \frac {a^{4} \log {\left (\tan {\left (c + d x \right )} \right )}}{d} + \frac {a^{4}}{2 d \tan ^{2}{\left (c + d x \right )}} - \frac {a^{4}}{4 d \tan ^{4}{\left (c + d x \right )}} + 4 a^{3} b x + \frac {4 a^{3} b}{d \tan {\left (c + d x \right )}} - \frac {4 a^{3} b}{3 d \tan ^{3}{\left (c + d x \right )}} + \frac {3 a^{2} b^{2} \log {\left (\tan ^{2}{\left (c + d x \right )} + 1 \right )}}{d} - \frac {6 a^{2} b^{2} \log {\left (\tan {\left (c + d x \right )} \right )}}{d} - \frac {3 a^{2} b^{2}}{d \tan ^{2}{\left (c + d x \right )}} - 4 a b^{3} x - \frac {4 a b^{3}}{d \tan {\left (c + d x \right )}} - \frac {b^{4} \log {\left (\tan ^{2}{\left (c + d x \right )} + 1 \right )}}{2 d} + \frac {b^{4} \log {\left (\tan {\left (c + d x \right )} \right )}}{d} & \text {otherwise} \end {cases} \]
Piecewise((zoo*a**4*x, Eq(c, 0) & Eq(d, 0)), (x*(a + b*tan(c))**4*cot(c)** 5, Eq(d, 0)), (zoo*a**4*x, Eq(c, -d*x)), (-a**4*log(tan(c + d*x)**2 + 1)/( 2*d) + a**4*log(tan(c + d*x))/d + a**4/(2*d*tan(c + d*x)**2) - a**4/(4*d*t an(c + d*x)**4) + 4*a**3*b*x + 4*a**3*b/(d*tan(c + d*x)) - 4*a**3*b/(3*d*t an(c + d*x)**3) + 3*a**2*b**2*log(tan(c + d*x)**2 + 1)/d - 6*a**2*b**2*log (tan(c + d*x))/d - 3*a**2*b**2/(d*tan(c + d*x)**2) - 4*a*b**3*x - 4*a*b**3 /(d*tan(c + d*x)) - b**4*log(tan(c + d*x)**2 + 1)/(2*d) + b**4*log(tan(c + d*x))/d, True))
Time = 0.29 (sec) , antiderivative size = 149, normalized size of antiderivative = 1.06 \[ \int \cot ^5(c+d x) (a+b \tan (c+d x))^4 \, dx=\frac {48 \, {\left (a^{3} b - a b^{3}\right )} {\left (d x + c\right )} - 6 \, {\left (a^{4} - 6 \, a^{2} b^{2} + b^{4}\right )} \log \left (\tan \left (d x + c\right )^{2} + 1\right ) + 12 \, {\left (a^{4} - 6 \, a^{2} b^{2} + b^{4}\right )} \log \left (\tan \left (d x + c\right )\right ) - \frac {16 \, a^{3} b \tan \left (d x + c\right ) + 3 \, a^{4} - 48 \, {\left (a^{3} b - a b^{3}\right )} \tan \left (d x + c\right )^{3} - 6 \, {\left (a^{4} - 6 \, a^{2} b^{2}\right )} \tan \left (d x + c\right )^{2}}{\tan \left (d x + c\right )^{4}}}{12 \, d} \]
1/12*(48*(a^3*b - a*b^3)*(d*x + c) - 6*(a^4 - 6*a^2*b^2 + b^4)*log(tan(d*x + c)^2 + 1) + 12*(a^4 - 6*a^2*b^2 + b^4)*log(tan(d*x + c)) - (16*a^3*b*ta n(d*x + c) + 3*a^4 - 48*(a^3*b - a*b^3)*tan(d*x + c)^3 - 6*(a^4 - 6*a^2*b^ 2)*tan(d*x + c)^2)/tan(d*x + c)^4)/d
Leaf count of result is larger than twice the leaf count of optimal. 335 vs. \(2 (135) = 270\).
Time = 1.73 (sec) , antiderivative size = 335, normalized size of antiderivative = 2.38 \[ \int \cot ^5(c+d x) (a+b \tan (c+d x))^4 \, dx=-\frac {3 \, a^{4} \tan \left (\frac {1}{2} \, d x + \frac {1}{2} \, c\right )^{4} - 32 \, a^{3} b \tan \left (\frac {1}{2} \, d x + \frac {1}{2} \, c\right )^{3} - 36 \, a^{4} \tan \left (\frac {1}{2} \, d x + \frac {1}{2} \, c\right )^{2} + 144 \, a^{2} b^{2} \tan \left (\frac {1}{2} \, d x + \frac {1}{2} \, c\right )^{2} + 480 \, a^{3} b \tan \left (\frac {1}{2} \, d x + \frac {1}{2} \, c\right ) - 384 \, a b^{3} \tan \left (\frac {1}{2} \, d x + \frac {1}{2} \, c\right ) - 768 \, {\left (a^{3} b - a b^{3}\right )} {\left (d x + c\right )} + 192 \, {\left (a^{4} - 6 \, a^{2} b^{2} + b^{4}\right )} \log \left (\tan \left (\frac {1}{2} \, d x + \frac {1}{2} \, c\right )^{2} + 1\right ) - 192 \, {\left (a^{4} - 6 \, a^{2} b^{2} + b^{4}\right )} \log \left ({\left | \tan \left (\frac {1}{2} \, d x + \frac {1}{2} \, c\right ) \right |}\right ) + \frac {400 \, a^{4} \tan \left (\frac {1}{2} \, d x + \frac {1}{2} \, c\right )^{4} - 2400 \, a^{2} b^{2} \tan \left (\frac {1}{2} \, d x + \frac {1}{2} \, c\right )^{4} + 400 \, b^{4} \tan \left (\frac {1}{2} \, d x + \frac {1}{2} \, c\right )^{4} - 480 \, a^{3} b \tan \left (\frac {1}{2} \, d x + \frac {1}{2} \, c\right )^{3} + 384 \, a b^{3} \tan \left (\frac {1}{2} \, d x + \frac {1}{2} \, c\right )^{3} - 36 \, a^{4} \tan \left (\frac {1}{2} \, d x + \frac {1}{2} \, c\right )^{2} + 144 \, a^{2} b^{2} \tan \left (\frac {1}{2} \, d x + \frac {1}{2} \, c\right )^{2} + 32 \, a^{3} b \tan \left (\frac {1}{2} \, d x + \frac {1}{2} \, c\right ) + 3 \, a^{4}}{\tan \left (\frac {1}{2} \, d x + \frac {1}{2} \, c\right )^{4}}}{192 \, d} \]
-1/192*(3*a^4*tan(1/2*d*x + 1/2*c)^4 - 32*a^3*b*tan(1/2*d*x + 1/2*c)^3 - 3 6*a^4*tan(1/2*d*x + 1/2*c)^2 + 144*a^2*b^2*tan(1/2*d*x + 1/2*c)^2 + 480*a^ 3*b*tan(1/2*d*x + 1/2*c) - 384*a*b^3*tan(1/2*d*x + 1/2*c) - 768*(a^3*b - a *b^3)*(d*x + c) + 192*(a^4 - 6*a^2*b^2 + b^4)*log(tan(1/2*d*x + 1/2*c)^2 + 1) - 192*(a^4 - 6*a^2*b^2 + b^4)*log(abs(tan(1/2*d*x + 1/2*c))) + (400*a^ 4*tan(1/2*d*x + 1/2*c)^4 - 2400*a^2*b^2*tan(1/2*d*x + 1/2*c)^4 + 400*b^4*t an(1/2*d*x + 1/2*c)^4 - 480*a^3*b*tan(1/2*d*x + 1/2*c)^3 + 384*a*b^3*tan(1 /2*d*x + 1/2*c)^3 - 36*a^4*tan(1/2*d*x + 1/2*c)^2 + 144*a^2*b^2*tan(1/2*d* x + 1/2*c)^2 + 32*a^3*b*tan(1/2*d*x + 1/2*c) + 3*a^4)/tan(1/2*d*x + 1/2*c) ^4)/d
Time = 5.41 (sec) , antiderivative size = 150, normalized size of antiderivative = 1.06 \[ \int \cot ^5(c+d x) (a+b \tan (c+d x))^4 \, dx=\frac {\ln \left (\mathrm {tan}\left (c+d\,x\right )\right )\,\left (a^4-6\,a^2\,b^2+b^4\right )}{d}-\frac {\ln \left (\mathrm {tan}\left (c+d\,x\right )+1{}\mathrm {i}\right )\,{\left (b+a\,1{}\mathrm {i}\right )}^4}{2\,d}-\frac {{\mathrm {cot}\left (c+d\,x\right )}^4\,\left ({\mathrm {tan}\left (c+d\,x\right )}^3\,\left (4\,a\,b^3-4\,a^3\,b\right )-{\mathrm {tan}\left (c+d\,x\right )}^2\,\left (\frac {a^4}{2}-3\,a^2\,b^2\right )+\frac {a^4}{4}+\frac {4\,a^3\,b\,\mathrm {tan}\left (c+d\,x\right )}{3}\right )}{d}-\frac {\ln \left (\mathrm {tan}\left (c+d\,x\right )-\mathrm {i}\right )\,{\left (a+b\,1{}\mathrm {i}\right )}^4}{2\,d} \]